package com.cls.business.vo;

import com.cls.business.entity.*;
import com.cls.system.entity.Expert;
import lombok.Data;

import java.util.Date;
import java.util.List;
import java.util.Set;

@Data
public class DeclareTopicVO {

    private Long declareId;

    private Long reportId;

    private Long declarePlanId;

    /**
     * 申报课题名称
     */
    private String name;


    /**
     * 申报课题编号
     */
    private String code;


    private String levelTypeCode;

    /**
     * 指南编号
     */
    private String topicCode;

    /**
     * 指南ID
     */
    private Long topicId;


    /**
     * 成果形式
     */
    private String achievementFormTypeCode;

    /**
     * 成果字数
     */
    private double achievementFormSize;

    /**
     * 学科分类
     */
    private String subjectTypeCode;


    /**
     * 研究类型
     */
    private String researchTypeCode;

    /**
     *
     */
    private String statusTypeCode;

    /**
     * 主要观点
     */
    private String mainPoint;
    private String topicClassifyCode;

    /**
     * 研究内容
     */
    private String researchContent;
    /**
     * 成员近三年研究成果
     */
    private String memberWorks3;

    /**
     * 主持人近五年研究成果
     */
    private String leaderWorks5;

    //点评结果前台用
    private String finalLevelTypeCode;
    //点评结果前后台用
    private String finalLevelTypeCodeWbe;




    /**
     * 显名文件
     */
    private Long normalFileId;


    /**
     * 匿名文件
     */
    private Long anonymousFileId;


    /**
     * 主持人信息
     */
    ApplicantInfo leader;


    /**
     * 牵头人人信息
     */
    MemberInfo initiator;

    /**
     * 委托课题信息附表信息
     */
    DeclareEntrust declareEntrust;


    private String leaderName;

    private String autoCheckResult;

    private String checkResult;

    private String itemCode;
    /**
     * 成员信息
     */
    private List<MemberInfo> memberInfos;
    /**
     * 拟定的研究成果
     */
    private List<DraftAchievement> draftAchievements;

    private List<LogDeclareTopic> logDeclareTopics;

    private TopicPlan topicPlan;

    private Topic topic;

    private Report report;

    private Expert expert;

    /**
     * 拟立项申请表附件id
     */
    private Long applyFileId;

    /**
     * 结项证书文件 id
     */
    private Long itemFileId;

    private Boolean isItemPublish;

    private Boolean isSubmit;

    private String statusCode;
    /**
     * 拟立项附件id
     */
    private Long preItemFileId;

    private Long preItemNoticeId;
    private String year;

    private Boolean isPreItemNotice;

    private Long planId;

    private Long planTopicId;
    //    委托课题结项申请文件
    private Long fileApplyId;
    private Long fileShowId;
    private Long fileHideId;
    private Double planScore;
    private Integer applyCount;
    private String planAchievementFormTypeCode;

    private Date conclusionTime;
    private String planLevelTypeCode;

    private String businessType;

    private Date latestApplyTime;
    /**
     * 主持人曾经主持省部级以上社科研究项目及完成情况
     */
    private List<LeaderProject> leaderProjects;
    private Set<Long> updateMemberIds;
    //删除人员
    private List<Long> deleteMemberIds;
    //删除项目
    private List<Long> deleteProjectIds;
    //删除成果
    private List<Long> deleteAchievementIds;

    public DeclareTopicVO() {

    }

    public DeclareTopicVO(DeclareTopic declareTopic) {
        declareId = declareTopic.getDeclareId();
        name = declareTopic.getName();
        finalLevelTypeCode = declareTopic.getFinalLevelTypeCode();
        topicClassifyCode = declareTopic.getTopicClassifyCode();
        code = declareTopic.getCode();
        levelTypeCode = declareTopic.getLevelTypeCode();
        topicCode = declareTopic.getTopicCode();
        topicId = declareTopic.getTopicId();
        achievementFormTypeCode = declareTopic.getAchievementFormTypeCode();
        achievementFormSize = declareTopic.getAchievementFormSize();
        statusTypeCode = declareTopic.getStatusTypeCode();
        subjectTypeCode = declareTopic.getSubjectTypeCode();
        researchTypeCode = declareTopic.getResearchTypeCode();
        mainPoint = declareTopic.getMainPoint();
        researchContent = declareTopic.getResearchContent();
        memberWorks3 = declareTopic.getMemberWorks3();
        leaderWorks5 = declareTopic.getLeaderWorks5();
        leaderName = declareTopic.getLeaderName();
        autoCheckResult = declareTopic.getAutoCheckResult();
        checkResult = declareTopic.getCheckResult();
        itemCode = declareTopic.getItemCode();
        applyFileId = declareTopic.getApplyFileId();
        year = declareTopic.getYear();
        statusCode = declareTopic.getStatusCode();
        isPreItemNotice = declareTopic.getIsPreItemNotice();
        planId = declareTopic.getPlanId();
        businessType = declareTopic.getBusinessType();
        normalFileId = declareTopic.getNormalFileId();
        anonymousFileId = declareTopic.getAnonymousFileId();
        itemFileId = declareTopic.getItemFileId();
        preItemFileId = declareTopic.getPreItemFileId();
        isItemPublish = declareTopic.getIsItemPublish();
        latestApplyTime = declareTopic.getLatestApplyTime();
    }

    public DeclareTopic convertToDeclareTopic() {
        DeclareTopic declareTopic = new DeclareTopic();
        declareTopic.setDeclareId(declareId);
        declareTopic.setName(name);
        declareTopic.setCode(code);
        declareTopic.setTopicClassifyCode(topicClassifyCode);
        declareTopic.setTopicId(topicId);
        declareTopic.setLevelTypeCode(levelTypeCode);
        declareTopic.setTopicCode(topicCode);
        declareTopic.setSubjectTypeCode(subjectTypeCode);
        declareTopic.setAchievementFormTypeCode(achievementFormTypeCode);
        declareTopic.setAchievementFormSize(achievementFormSize);
        declareTopic.setStatusTypeCode(statusTypeCode);
        declareTopic.setResearchTypeCode(researchTypeCode);
        declareTopic.setMainPoint(mainPoint);
        declareTopic.setResearchContent(researchContent);
        declareTopic.setMemberWorks3(memberWorks3);
        declareTopic.setLeaderWorks5(leaderWorks5);
        declareTopic.setLeaderName(leaderName);
        declareTopic.setCheckResult(checkResult);
        declareTopic.setAutoCheckResult(autoCheckResult);
        declareTopic.setStatusCode(statusCode);
        declareTopic.setIsPreItemNotice(isPreItemNotice);
        declareTopic.setNormalFileId(normalFileId);
        declareTopic.setAnonymousFileId(anonymousFileId);
        return declareTopic;
    }
}
